﻿/*
 * Reports the zero-based index of the first occurrence of the specified string in this string.
 */
create function [String].[IndexOf] ( @p_String nvarchar(max), @p_Term nvarchar(max) )
returns int as
begin

  return PatIndex( @p_String, @p_Term );

end